package com.yisu.auction.api.domain.vo.goodsInfoPackageVos;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * author: 赵杰
 * Business Description：
 * createTime：2017/8/19
 */
public class LatestAnnouncedVo {

    private String image; //产品图片
    private String userName;//用户名
    private BigDecimal transactionPrice; //成交价
    private String savePercentage; //节省百分比
    private long prizeId;
    private String announceTime; //揭晓时间
    private BigDecimal price; //市场价
    private Long  nextPeriodPrizeId;//下期竞品ID
    private String goodsName; //商品名称
    private Integer term;//期号

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public BigDecimal getTransactionPrice() {
        if(transactionPrice==null)
            return BigDecimal.valueOf(0);
        return transactionPrice;
    }

    public void setTransactionPrice(BigDecimal transactionPrice) {
        this.transactionPrice = transactionPrice;
    }

    public String getSavePercentage() {
        return savePercentage;
    }

    public void setSavePercentage(String savePercentage) {
        this.savePercentage = savePercentage;
    }

    public long getPrizeId() {
        return prizeId;
    }

    public void setPrizeId(long prizeId) {
        this.prizeId = prizeId;
    }

    public String getAnnounceTime() {
        return announceTime;
    }

    public void setAnnounceTime(Date announceTime) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        this.announceTime = simpleDateFormat.format(announceTime);
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Long getNextPeriodPrizeId() {
        if(nextPeriodPrizeId==null)
            return Long.valueOf(0);
        return nextPeriodPrizeId;
    }

    public void setNextPeriodPrizeId(Long nextPeriodPrizeId) {
        this.nextPeriodPrizeId = nextPeriodPrizeId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public Integer getTerm() {
        return term;
    }

    public void setTerm(Integer term) {
        this.term = term;
    }
}
